LAUSD Schools Map

In [2]:
import pandas
import numpy as np
import folium
from folium import plugins
import json
In [6]:
##filename = "lausd.geojson"
##info = []

##with open(filename) as file:
    
##    data = pandas.read_json(file)
In [4]:
##%%bash
##head lausd.geojson
In [11]:
def show_district_map():
    geo_path = 'lausd.geojson'
    districts = folium.Map(location=[34.1826, -118.4397],tiles='cartodbdark_matter',zoom_start=11)
    districts.geo_json(
        geo_path=geo_path,
        fill_color='#7FFFD4',
        #key_on='feature.properties.label',
        key_on='feature.properties.LABEL',
        fill_opacity=0.7,
        line_opacity=0.2,
        reset=True
    
        
    )
    
    #folium.GeoJson(open('lausd.geojson'), name = 'schools').add_to(districts)
    
    districts.save("districts.html")
    return districts

show_district_map()
/home/andresistor/anaconda3/lib/python3.5/site-packages/folium/folium.py:504: UserWarning: This method is deprecated. Please use Map.choropleth instead.
  warnings.warn('This method is deprecated. '
Out[11]:
In [ ]:
 

blogroll

social